<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
</head>
<body>
	<div id="app">
		<div>{{num}}</div>
		<div>
			<button v-on:click='num++' style="height: 20px">点击</button>

			<!-- 简化版： -->
			<button @click='num++'>点击2</button>
			<button @click='handle'>点击3</button>
			<button @click='handle()'>点击4</button>


		</div>
	</div> 
	<script type="text/javascript" src="js/vue.js"></script>
	<script type="text/javascript">
		/*
			事件绑定：

		*/
		var vm = new Vue({
			el: '#app',
			data: {
				num: 0
			},
			methods: {
				handle: function() {
					// 这里的this是vue的实例对象
					console.log(this == vm)
					this.num++;
				}
			}
		});
	</script>
</body>
</html>